package com.SmartCare.common.enums;

/**
 * 养老院职工角色枚举常量
 */
public enum ElderlyCareRole {
    CAREGIVER(1, "护理员"),
    MANAGER(2,"管理员"),
    NURSING_DIRECTOR(3, "护理主任"),
    DIRECTOR(4, "院长");
    private final int value;
    private final String roleName;

     ElderlyCareRole(int value, String roleName) {
        this.value = value;
        this.roleName = roleName;
    }

    public int getValue() {
        return value;
    }

    public String getRoleName() {
        return roleName;
    }
    public static String getRoleNameByValue(int value) {
        for (ElderlyCareRole role : ElderlyCareRole.values()) {
            if (role.getValue() == value) {
                return role.getRoleName();
            }
        }
        return null; // 如果没有匹配的值，可以根据需要返回一个默认值或抛出异常
    }

}
